import request from '@/utils/request'

/* ***************   前期测绘机构选取    *************** */

// 获取用户信息
export function findById(data) {
  return request({
    url: '/pc/system/pc_user/4_find_by_id',
    method: 'POST',
    formData: data
  })
}

// 查询片块前期测绘红线
export function selectErlyMultiPolygon(data) {
  return request({
    url: '/pc/gtinner/my_project/select_early_multi_polygon',
    method: 'POST',
    formData: data
  })
}

// 查询片块竣工测绘红线
export function selectLaterMultiPolygon(data) {
  return request({
    url: '/pc/gtinner/my_project/select_later_multi_polygon',
    method: 'POST',
    formData: data
  })
}
// 查询流程是否已执行过（再次上传）
export function queryHistoryTaskBoolean(data) {
  return request({
    url: '/pc/project/pre_assembly/14_query_history_task_boolean',
    method: 'POST',
    formData: data
  })
}
// 获取项目流程步骤
export function getProjectProcessedStep(data) {
  return request({
    url: '/pc/project/business_handling/03_get_project_processed_step',
    method: 'POST',
    formData: data
  })
}

// 获取外业数据详情
export function getWySupervisingCheck(data) {
  return request({
    url: '/pc/gtinner/land_constructing_inspection_activity_log/supervising_check',
    method: 'POST',
    formData: data
  })
}

// 获取通用审查意见
export function getCheckData(data) {
  return request({
    url: '/renovation/examineOpinion/detail',
    method: 'POST',
    formData: data
  })
}

// 提交通用审查意见
export function insetYjData(data) {
  return request({
    url: '/renovation/examineOpinion/add',
    method: 'POST',
    formData: data
  })
}

export function getFile(data) {
  return request({
    url: '/renovation/file/getFile',
    method: 'POST',
    formData: data
  })
}

// 获取文件详情
export function getFileDetail(projectId) {
  return request({
    url: `/renovation/prophaseSurvey/firstAudit/dist/detail?projectId=${projectId}`,
    method: 'post'
  })
}

// 获取选取
export function getEnterpriseByPermission(data) {
  return request({
    url: '/pc/system/app_enterprise/7_get_enterprise_by_permission',
    method: 'POST',
    formData: data
  })
}

// 流程回退
export function submitProcessComeback(data) {
  return request({
    url: '/renovation/attachmentAuditAdvice/confirmBack',
    method: 'POST',
    formData: data
  })
}

// 附件批量下载
export function opinionReview(data) {
  return request({
    url: '/pc/project/opinion_review',
    method: 'POST',
    formData: data
  })
}

// 三期获取附件列表
export function attachmentList(data) {
  return request({
    url: '/renovation/attachmentData/list',
    method: 'POST',
    formData: data
  })
}

// 二期获取附件列表
export function attachmentListForTwo(data) {
  return request({
    url: '/pc/project/reclaim/attachment/02_query',
    method: 'POST',
    data
  })
}

// 二期添加附件意见
export function attachmentListForTwoAdd(data) {
  return request({
    url: '/pc/project/reclaim/attachment/01_save',
    method: 'POST',
    data
  })
}

// 二期修改附件意见
export function attachmentListForTwoEdit(data) {
  return request({
    url: '/pc/project/reclaim/attachment/04_update',
    method: 'POST',
    data
  })
}

// 二期删除附件意见
export function attachmentListForTwoDel(data) {
  return request({
    url: '/pc/project/reclaim/attachment/03_delete',
    method: 'POST',
    formData: data
  })
}

// 校验附件审查意见
export function verify_drawings_opinion(data) {
  return request({
      url: '/pc/project/reclaim/attachment/05_verify_drawings_opinion',
      method: 'POST',
      formData: data
  })
}

